<template>
  <div>
    <div class="search">
      <p class="search-text">人员搜索:</p>
      <el-input placeholder="请输入内容" v-model="input" clearable class="search-input">
      </el-input>
      <el-select v-model="value" placeholder="请选择" class="search-input">
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
        </el-option>
      </el-select>
      <el-button type="primary" icon="el-icon-search" class="search-button">查询</el-button>
    </div>

    <el-table :data="tableData" style="width: 100%;" :header-cell-style="headClass">
      <el-table-column label="序号" width="80" type="index">
      </el-table-column>
      <el-table-column label="人员名称" width="180" prop="name">
      </el-table-column>
      <el-table-column label="角色" width="180" prop="juese">
      </el-table-column>
      <el-table-column label="联系电话" width="180" prop="phone">
      </el-table-column>
      <el-table-column label="完成工单(本月)" width="180" prop="w">
      </el-table-column>
      <el-table-column label="进行中工单" width="180" prop="j">
      </el-table-column>
      <el-table-column label="拒绝工单(本月)" width="180" prop="ju">
      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button type="text" @click="select(scope.row.id)">查看详情</el-button>
        </template>
      </el-table-column>
    </el-table>
    <userwords v-model="dialogTableVisible"></userwords>
    <div class="block">
      <el-pagination @size-change="10" @current-change="handleCurrentChange" :current-page="currentPage4"
        layout="total,prev, next" :total="5">
      </el-pagination>
    </div>
  </div>
</template>
<script>
import userwords from './components/userwords.vue'
export default {
  name: '',
  components: {
    userwords
  },
  data() {
    return {
      input: '',

      tableData: [{
        name: '测试',
        juese: '王小虎',
        phone: '110',
        w: '10',
        j: '10',
        ju: '10'
      },
      {
        name: '测试',
        juese: '王小虎',
        phone: '110',
        w: '10',
        j: '10',
        ju: '10'
      },
      {
        name: '测试',
        juese: '王小虎',
        phone: '110',
        w: '10',
        j: '10',
        ju: '10'
      },
      {
        name: '测试',
        juese: '王小虎',
        phone: '110',
        w: '10',
        j: '10',
        ju: '10'
      }, {
        name: '测试',
        juese: '王小虎',
        phone: '110',
        w: '10',
        j: '10',
        ju: '10'
      }],

      currentPage4: 1,

      options: [{
        value: '选项1',
        label: '运营者'
      }, {
        value: '选项2',
        label: '维修者'
      }],
      value: '',
      dialogTableVisible: false
    }
  },
  computed: {
  },
  created() {
  },
  methods: {
    select() {
      this.dialogTableVisible = true
    },
    headClass() {
      return 'background:#f3f6fb;color:#7d6666;font-weight:400;'
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    }
  }
}

</script>
<style lang='scss'  scoped>
.search {
  display: flex;
  margin: 20px 0 40px 0;

  .search-text {
    line-height: 10px;
    color: gray;
  }

  .search-input {
    width: 200px;
    margin: 0 10px;
  }

  .search-input1 {
    width: 200px;
    margin: 0 10px;
  }

  .search-button {
    height: 40px;
    background-color: #5f84ff;
    border: 0;
  }
}

.renyuan-add {
  background-color: #ff8437;
  border: 0;
  margin: 50px 0 10px 0;
}
</style>
